package com.yfp.operation.mapper;

import com.yfp.operation.domain.CPComboRoad;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.dto.CPComboRoadDTO;
import com.yfp.operation.domain.dto.ComboSoldOutDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【c_p_combo_road】的数据库操作Mapper
* @createDate 2024-04-24 16:50:31
* @Entity domain.com.yfp.operation.CPComboRoad
*/
public interface CPComboRoadMapper extends BaseMapper<CPComboRoad> {

    List<CPComboRoad> getCPComboRoads(String cPlanId);

    List<CPComboRoad> selectByCpIdAndDate(@Param("cPlanId") String cPlanId, @Param("currentDate") String currentDate);

    /**
     * 批量插入
     * @param comboRoadList
     */
    void addAll(@Param("comboRoadList") List<CPComboRoadDTO> comboRoadList);

    /**
     * 根据套餐计划id和套餐id删除套餐信息
     * @param comboSoldOutDTO
     */
    void deleteByCPlanIdAndComboId(ComboSoldOutDTO comboSoldOutDTO);
    void deleteByCPlanId(String cplanId);

    /**
     * 根据套餐计划id获取货道信息
     * @param cPlanId
     * @return
     */
    List<CPComboRoad> getByCPlanId(String cPlanId);
}




